/*
* 用户相关的
*/


import store from '../'


export function logout({ state, commit, dispatch }, userInfo) {
	
	//清除用户信息
	state.vuex_user = {};
	commit('$uStore', {
		name: 'vuex_user',
		value: {}
	});
	uni.removeStorageSync('userInfo');
	
	uni.setTabBarItem({
		index: 1,
		iconPath: '/static/images/tabbar/repair.png',
		selectedIconPath: '/static/images/tabbar/repair-fill.png',
		pagePath: '/pages/client/repair/index'
	});
	uni.reLaunch({
		url: '/pages/home/index'
	});
}